﻿@model XSTDZ.ERP.Application.DataContracts.ClientLinkDto
@using XSTDZ.ERP.Infrastructure.Extentions
@{
    ViewBag.Title = " - 添加供应商联系人";
}
@section header{
     <link href="@Url.Content("~/Content/Controls.css")" rel="stylesheet" type="text/css" />
 <link href="@Url.Content("~/Content/Form.css")" rel="stylesheet" type="text/css" />
}

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

 <table class="formtable">
    <thead>
        <tr>
            <th colspan="4">@*更新联系人*@
            <div id="toptoolbar"></div>
            </th>
        </tr>
    </thead>
      <tr>
          <td class="title">@Html.LabelFor(model => model.ClientID)<b>*</b></td>
        <td> 
            @Html.TextBoxFor(model => model.ClientName, new { @class = "text disablebg", @readonly = "readonly" })
             @*<input type="hidden"  id="ClientID" name="ClientID" value="@ViewBag.ClientId" />*@
              @Html.HiddenFor(model => model.ClientID)
            <a href="javascript:void(0);" onclick="javascript:selectClient();" >选择</a>
             @Html.ValidationMessageFor(model => model.ClientID)
        </td>

        <td class="title"></td>
        <td> 
         </td>
    </tr>
      <tr>
          <td class="title"> @Html.LabelFor(model => model.LinkManNmae)<b>*</b></td>
        <td> @Html.TextBoxFor(model => model.LinkManNmae, new { @class = "text" })
        @Html.ValidationMessageFor(model => model.LinkManNmae)
     
      @Html.HiddenFor(model => model.Id)
      @Html.HiddenFor(model => model.CreateID)
       @Html.HiddenFor(model => model.CreateTime)
        </td>

        <td class="title">@Html.LabelFor(model => model.Sex)</td>
        <td> @* @Html.TextBoxFor(model => model.Sex, new { @class = "text" })*@
            @Html.RadioButtonList("Sex", ViewBag.Gender as IEnumerable<SelectListItem>)
              @Html.ValidationMessageFor(model => model.Sex)
         </td>
    </tr>
   
     <tr>
          <td class="title"> @Html.LabelFor(model => model.CredentialsType)</td>
        <td> @*@Html.TextBoxFor(model => model.CredentialsType, new { @class = "text" })*@
         @Html.DropDownListFor(model => model.CredentialsType, ViewBag.CredentialsType as IEnumerable<SelectListItem>, new { @class = "select" })
         @Html.HiddenFor(model => model.CredentialsType)
        @Html.ValidationMessageFor(model => model.CredentialsType)
    
        </td>

        <td class="title">@Html.LabelFor(model => model.CredentialsNo)</td>
        <td>  @Html.TextBoxFor(model => model.CredentialsNo, new { @class = "text" })
            @Html.ValidationMessageFor(model => model.CredentialsNo)
         </td>
    </tr>

    <tr>
          <td class="title"> @Html.LabelFor(model => model.Department)</td>
        <td> @Html.TextBoxFor(model => model.Department, new { @class = "text" })
        @Html.ValidationMessageFor(model => model.Department)
    
        </td>

        <td class="title">@Html.LabelFor(model => model.CurrentJob)</td>
        <td>  @Html.TextBoxFor(model => model.CurrentJob, new { @class = "text" })
            @Html.ValidationMessageFor(model => model.CurrentJob)
         </td>
    </tr>
     
     <tr>
          <td class="title"> @Html.LabelFor(model => model.BusinessScope)</td>
        <td> @Html.TextBoxFor(model => model.BusinessScope, new { @class = "text" })
        @Html.ValidationMessageFor(model => model.BusinessScope)
    
        </td>

        <td class="title">@Html.LabelFor(model => model.StudioCamera)</td>
        <td>  @Html.TextBoxFor(model => model.StudioCamera, new { @class = "text" })
            @Html.ValidationMessageFor(model => model.StudioCamera)
         </td>
    </tr>

    <tr>
          <td class="title"> @Html.LabelFor(model => model.MobilePhone)</td>
        <td> @Html.TextBoxFor(model => model.MobilePhone, new { @class = "text" })
        @Html.ValidationMessageFor(model => model.MobilePhone)
    
        </td>

        <td class="title">@Html.LabelFor(model => model.Email)</td>
        <td>  @Html.TextBoxFor(model => model.Email, new { @class = "text" })
            @Html.ValidationMessageFor(model => model.Email)
         </td>
    </tr>

        <tr>
          <td class="title"> @Html.LabelFor(model => model.MSNQQ)</td>
        <td> @Html.TextBoxFor(model => model.MSNQQ, new { @class = "text" })
        @Html.ValidationMessageFor(model => model.MSNQQ)
    
        </td>

        <td class="title"></td>
        <td> 
         </td>
    </tr>

     <tr>
          <td class="title"> @Html.LabelFor(model => model.Remarks)</td>
        <td> @Html.TextBoxFor(model => model.Remarks, new { @class = "text" })
        @Html.ValidationMessageFor(model => model.Remarks)
    
        </td>

        <td class="title"></td>
        <td> 
         </td> 
    </tr>

     <tr>
        <td  colspan="4">
         <p class="divBtn">
               <input type="hidden" id="hidHttpRefeParent" name="hidHttpRefeParent" value="grid" />
         <input type="hidden" id="hidHttpPostState" name="hidHttpPostState" value="@ViewBag.PostState" />
            <input type="submit" value="@XSTDZ.ERP.Infrastructure.SystemConfig.BtnSave"  class="BtnSubmit" id="submitBtn" name="submitBtn" />
            <input type="button" value="@XSTDZ.ERP.Infrastructure.SystemConfig.BtnClose" id="btnFromClose" name="btnFromClose" class="BtnClose" />
        </p>
           </td>
    </tr>
    </table>
}
<script type="text/javascript">
    function selectClient() {
        var returnValue = window.showModalDialog('../Client/SelectClient?orgCode=@ViewBag.OrgCode', window, "help:No;resizable:No;status:No;scroll:yes;dialogWidth=600px;dialogHeight=300px");
        if (returnValue != null && returnValue != undefined) {
            $("#ClientName").val(returnValue[0]);
            $("#ClientID").val(returnValue[1]);
        }
    }
</script>
<script type="text/javascript" src="@Url.Content("~/Content/js/formBase.js")"></script>